
#ifndef TOOLBAR_H
#define TOOLBAR_H
#include "window.h"
#include <commctrl.h>
#include <vector>

namespace win
{
class Toolbar : public ChildWindow
{
	private:
		int _bar_height;
	public:
		enum win_button
			{ file_open = STD_FILEOPEN,
              file_save = STD_FILESAVE,
              edit_copy = STD_COPY,
              edit_paste = STD_PASTE,
              edit_cut = STD_CUT };
		Toolbar();
		void Create(Window &parent, const int child_index);
		void AddWindowsButton(const win_button btn,
  						      int command_id,
              				  bool enabled = true);
		void AddResourceButtons(unsigned int resId, 
					 	const std::vector<int> &commandIds);
		void SetButtonState(int commandId, bool enabled);
		void AddSeperator();
		void AdjustLayout()
			{::SendMessage(_hwnd, TB_AUTOSIZE, 0, 0);};
		int GetHeight() const
			{ return _bar_height; }
		~Toolbar();
};
}
#endif

